#!/bin/bash
dest=/home/dev/project/1/www
dest1=/home/dev/project/1/www2
dest2=/home/dev/project/1/www5
dest3=/home/dev/project/1/ww1
#src=/Users/ryan/flutter_extrade_new/web

case $1 in
   1)
	echo "deploy dev"
	ssh -p22 dev@149.28.153.216 "rm -rf $dest/*"
	scp -r $2/* dev@149.28.153.216:$dest/
   	 ;;
   2)
    	echo "deploy safepal2"
		ssh -p22 dev@149.28.153.216 "rm -rf $dest1/*"
		scp -r $2/* dev@149.28.153.216:$dest1/
	 ;;
   3)
    	echo "deploy safepal5"
		ssh -p22 dev@149.28.153.216 "rm -rf $dest2/*"
		scp -r $2/* dev@149.28.153.216:$dest2/
	 ;;	 
   4)
		echo "deploy dapp"
		ssh -p22 dev@149.28.153.216 "rm -rf $dest3/*"
        scp -r $2/* dev@149.28.153.216:$dest3/
	 ;;
   5)
   		echo "deploy dapp vue"
		ssh -p22 dev@149.28.153.216 "sh /home/dev/vue.sh"
	 ;;
   *)
        echo "Usage：$0 [1|2|3|4]"
esac

